package cn.kimming.wms.service;

import java.math.BigDecimal;
import java.util.List;

import cn.kimming.wms.domain.Depot;
import cn.kimming.wms.domain.ProductStock;
import cn.kimming.wms.domain.StockIncomeBillItem;
import cn.kimming.wms.domain.StockOutcomeBillItem;
import cn.kimming.wms.query.QueryObject;

public interface IProductStockService {
	void save(ProductStock obj);

	void update(ProductStock obj);

	void delete(Long id);

	ProductStock get(Long id);

	List<ProductStock> list();
	
	List<ProductStock> query(QueryObject qo);
	
	/**
	 * 到货入库库存操作
	 * @param depot	入库仓库
	 * @param item	入库的明细(内含货品的价格,数量等信息)
	 */
	void stockIncome(Depot depot, StockIncomeBillItem item);
	
	/**
	 * 销售出库库存操作
	 * @param depot	出库仓库
	 * @param item	出库的明细(内含货品的价格,数量等信息)
	 * @return 返回库存价格(便于生成销售账)
	 */
	BigDecimal stockOutcome(Depot depot, StockOutcomeBillItem item);
}
